<template>
	<view class="">
		<!-- <uni-nav-bar left-icon="left" title="资质认证" backgroundColor="#F5F7F8" @clickLeft="back"/> -->
		<view class="auth-content">
			<view class="auth-item">
				<view class="auth-title">
					<view>实名认证</view>
					<image src="https://qiniu-cdn.maeiyun.com/imgs/massage/renzheng.png" mode="aspectFill"></image>
				</view>
				<view class="auth-info">
					{{certificationData.real_name}} 身份证号 {{certificationData.id_card}}
				</view>
			</view>
			<view class="auth-item">
				<view class="auth-title">
					<view>健康证</view>
					<image src="https://qiniu-cdn.maeiyun.com/imgs/massage/renzheng.png" mode="aspectFill"></image>
				</view>
				<view class="auth-info">
					<image @click="lookImg(certificationData.health_certificate)" :src="certificationData.health_certificate" mode="aspectFill"></image>
				</view>
			</view>
			<view class="auth-item">
				<view class="auth-title">
					<view>从业资格证</view>
					<image src="https://qiniu-cdn.maeiyun.com/imgs/massage/renzheng.png" mode="aspectFill"></image>
				</view>
				<view class="auth-info">
					<image @click="lookImg(certificationData.seniority_image)" :src="certificationData.seniority_image" mode="aspectFill"></image>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				id:"",
				certificationData:{}
			}
		},
		onLoad(option) {
			this.id = option.id
			this.getCertification()
		},
		methods:{
			back(){
				uni.navigateBack()
			},
			lookImg(url){
				uni.previewImage({
					urls: [url]	
				});
			},
			getCertification(){
				let that = this
				this.request.httpTokenRequest({
					url: "service/getAuthInfo",
					method: "get"
				}, {
					technician_id: this.id
				}).then(res => {
					if (res.code == 0) {
						that.certificationData = res.data
					} else {
						this.$util.msg(res.msg)
						return
					}
				}, error => {})
			},
		}
	}
</script>

<style lang="scss">
	.auth-content{
		padding: 30rpx;
		.auth-item{
			background: #FFFFFF;
			border-radius: 20rpx;
			padding-bottom: 30rpx;
			margin-bottom: 31rpx;
			.auth-title{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding: 28rpx  30rpx;
				font-size: 30rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 500;
				color: #08090A;
				image{
					width: 96rpx;
					height: 30rpx;
					border-radius: 10rpx;
				}
			}
			.auth-info{
				padding: 0 30rpx;
				font-size: 26rpx;
				font-family: PingFangSC, PingFang SC;
				font-weight: 400;
				color: #08090A;
				image{
					width: 628rpx;
					height: 369rpx;
					border-radius: 10rpx;
				}
			}
		}
	}
</style>